#!/usr/bin/python
import MySQLdb as mdb

con = mdb.connect('localhost', 'testuser', 'test123', 'testdb')

with con:

	cur = con.cursor()
	cur.execute("CREATE TABLE IF NOT EXISTS Writers(Id INT PRIMARY KEY AUTO_INCREMENT, Name VARCHAR(25))")
	cur.execute("INSERT INTO Writers(Name) VALUES('Jack London')")
	cur.execute("INSERT INTO Writers(Name) VALUES('Honore de Balzac')")
	cur.execute("INSERT INTO Writers(Name) VALUES('Usman Khan')")
	cur.execute("INSERT INTO Writers(Name) VALUES('Humair Ghauri')")
	cur.execute("INSERT INTO Writers(Name) VALUES('Beverly Foster')")
	cur.execute("INSERT INTO Writers(Name) VALUES('Doug Bobby')")

con.close()


